package com.efounder.core;

import android.os.Environment;

import java.io.File;

/**
 * Created by meijun on 17-3-13.
 *
 * 抽出抽象类,子类实现抽象类,独自实现,
 * 		VOiceRecorder_endWithAMR  -----> 录音的实现类,用 MediaRecord实现
 * 	    voicerecore_endWithMP3 ---------->录音的实现类,用 audioRecord实现
 *
 */
public abstract class VoiceRecorderAbstract {
	//文件路径
	public  static String path = Environment.getExternalStorageDirectory().getAbsolutePath()+File.separator+ "VOICE";

	public abstract String startRecording();

	abstract String startRecording(String speakerID);

	abstract void discardRecording();

	public abstract int stopRecoding();

	abstract String getVoiceFileName(String s);

	abstract boolean isRecording();


	public String getVoiceFilePath(String speakerID) {
		//存储方式为 /storage/VOICE/{speakerID}/time+id+.arm
		return new File(path, speakerID).getAbsolutePath();
/*
		return (new StringBuilder())
				//.append(PathUtil.getInstance().getVoicePath()).append("/")
				.append(path)
				.append(voiceFileName).toString();*/
	}


}
